package com.mes.biz.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.core.service.BaseServiceImpl;
import com.mes.biz.mapper.BizPaymentDetailMapper;
import com.mes.biz.domain.BizPaymentDetail;
import com.mes.biz.service.BizPaymentDetailService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 收款明细Service业务层处理
 * @author wy
 * @email wy
 * @date 2023-07-10
 */
@Service
@Transactional(readOnly = true)
public class BizPaymentDetailServiceImpl extends BaseServiceImpl<BizPaymentDetailMapper, BizPaymentDetail> implements BizPaymentDetailService {

    private static final Logger log = LoggerFactory.getLogger(BizPaymentDetailServiceImpl.class);

    /**
     * 获取单条数据
     * @param bizPaymentDetail 收款明细
     * @return 收款明细
     */
    @Override
    public BizPaymentDetail get(BizPaymentDetail bizPaymentDetail) {
        BizPaymentDetail dto = super.get(bizPaymentDetail);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 收款明细id
     * @return 收款明细
     */
    @Override
    public BizPaymentDetail get(String id) {
        BizPaymentDetail dto = super.get(id);
        return dto;
    }

    /**
     * 查询收款明细列表
     * @param bizPaymentDetail 收款明细
     * @return 收款明细
     */
    @Override
    public List<BizPaymentDetail> findList(BizPaymentDetail bizPaymentDetail) {
		List<BizPaymentDetail> bizPaymentDetailList = super.findList(bizPaymentDetail);
        return bizPaymentDetailList;
    }

    /**
     * 分页查询收款明细列表
     * @param bizPaymentDetail 收款明细
     * @return 收款明细
     */
    @Override
    public PageInfo<BizPaymentDetail> findPage(BizPaymentDetail bizPaymentDetail) {
		PageInfo<BizPaymentDetail> page = super.findPage(bizPaymentDetail);
        return page;
    }

    /**
     * 保存收款明细
     * @param bizPaymentDetail
     * @return 结果
     */
    @Override
    public boolean save(BizPaymentDetail bizPaymentDetail) {
        return super.save(bizPaymentDetail);
    }

    /**
     * 删除收款明细信息
     * @param bizPaymentDetail
     * @return 结果
     */
    @Override
    public boolean remove(BizPaymentDetail bizPaymentDetail) {
        return super.remove(bizPaymentDetail);
    }

    /**
     * 批量删除收款明细
     * @param ids 需要删除的收款明细ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBizPaymentDetailByIds(String[] ids) {
        return mapper.deleteBizPaymentDetailByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

    @Transactional(readOnly = false)
    @Override
    public int deleteBizPaymentDetailByPaymentId(String paymentId) {
        return mapper.deleteBizPaymentDetailByPaymentId(paymentId, BaseEntity.DEL_FLAG_DELETE);
    }

    @Override
    public List<BizPaymentDetail> selectByPaymentId(String paymentId) {
        return mapper.selectByPaymentId(paymentId);
    }

}
